//
// Copyright (c) 2009-2011, chunquedong
//
// This file is part of ChunMap project
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
//
// History:
//   2011-05-03  Jed Young  Creation
//

using gfx
using chunmapData

**
** Symbolizer
**
@Js
@Serializable
const abstract class Symbolizer
{
  const RenderFilter[] filters := [,]

  Void tryDraw(RenderEnv r)
  {
    pass := filters.all |f| { f.isPass(r.data) }
    if (pass) draw(r)
  }

  abstract Void draw(RenderEnv r)
}